Optimal. Leaf size=183 \[ \frac {(A+i B) \tan ^{m+1}(c+d x) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (m+1;-n,1;m+2;-\frac {b \tan (c+d x)}{a},-i \tan (c+d x)\right )}{2 d (m+1)}+\frac {(A-i B) \tan ^{m+1}(c+d x) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (m+1;-n,1;m+2;-\frac {b \tan (c+d x)}{a},i \tan (c+d x)\right )}{2 d (m+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3603, 3602, 135, 133} \[ \frac {(A+i B) \tan ^{m+1}(c+d x) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (m+1;-n,1;m+2;-\frac {b \tan (c+d x)}{a},-i \tan (c+d x)\right )}{2 d (m+1)}+\frac {(A-i B) \tan ^{m+1}(c+d x) (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (m+1;-n,1;m+2;-\frac {b \tan (c+d x)}{a},i \tan (c+d x)\right )}{2 d (m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 133
Rule 135
Rule 3602
Rule 3603
Rubi steps
\begin {align*} \int \tan ^m(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx &=\frac {1}{2} (A-i B) \int (1+i \tan (c+d x)) \tan ^m(c+d x) (a+b \tan (c+d x))^n \, dx+\frac {1}{2} (A+i B) \int (1-i \tan (c+d x)) \tan ^m(c+d x) (a+b \tan (c+d x))^n \, dx\\ &=\frac {(A-i B) \operatorname {Subst}\left (\int \frac {x^m (a+b x)^n}{1-i x} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {(A+i B) \operatorname {Subst}\left (\int \frac {x^m (a+b x)^n}{1+i x} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {\left ((A-i B) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \operatorname {Subst}\left (\int \frac {x^m \left (1+\frac {b x}{a}\right )^n}{1-i x} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left ((A+i B) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \operatorname {Subst}\left (\int \frac {x^m \left (1+\frac {b x}{a}\right )^n}{1+i x} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {(A+i B) F_1\left (1+m;-n,1;2+m;-\frac {b \tan (c+d x)}{a},-i \tan (c+d x)\right ) \tan ^{1+m}(c+d x) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{2 d (1+m)}+\frac {(A-i B) F_1\left (1+m;-n,1;2+m;-\frac {b \tan (c+d x)}{a},i \tan (c+d x)\right ) \tan ^{1+m}(c+d x) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{2 d (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 2.77, size = 0, normalized size = 0.00 \[ \int \tan ^m(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.87, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.36, size = 0, normalized size = 0.00 \[ \int \left (\tan ^{m}\left (d x +c \right )\right ) \left (a +b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + B \tan {\left (c + d x \right )}\right ) \left (a + b \tan {\left (c + d x \right )}\right )^{n} \tan ^{m}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________